import { Component, OnInit } from '@angular/core';
import { BladeService } from "../../../shared/blade.service";
import { BladeData } from "../../../shared/blade/blade-data";
import { Observable } from "rxjs/Observable";
import { SoundListComponent } from "./sound-list/sound-list.component";
import { Blade } from "../../../shared/blade/blade.model";

@Component({
  selector: 'app-sound',
  templateUrl: './sound.component.html',
  styleUrls: ['./sound.component.css'],
  providers: [BladeService]
})
export class SoundComponent implements OnInit {

  constructor(public bladeService: BladeService) { }

  ngOnInit() {
    this.createFarmListtBlade()
  }
  /**
   * 创建声音列表弹出层
   * 
   * 
   * @memberof DicComponent
   */
  createFarmListtBlade() {
    let data: BladeData = new BladeData();
    data.id = "soundList";
    data.title = "声音列表";    
    data.isClosingDisabled = true;
    let soundListBlade = this.bladeService.createBlade(SoundListComponent, data);
    this.bladeService.showBlade(soundListBlade);
  }
   /**
   * 是否可以离开
   * 
   * 
   * @memberof DicComponent
   */
  canDeactivate(): boolean | Observable<boolean> | Promise<boolean> {
    return true;
  }


}



// WEBPACK FOOTER //
// ./src/app/module/basic/sound/sound.component.ts